muninlite: uptime should report days, not seconds.
authorCraig Gallek <[email protected]>
Thu, 22 Jan 2015 15:10:55 +0000 (10:10 -0500)
committerJonathan McCrohan <[email protected]>
Thu, 29 Jan 2015 21:31:49 +0000 (21:31 +0000)
upstream bug: https://sourceforge.net/p/muninlite/patches/8/

Closes #810

Signed-off-by: Craig Gallek <[email protected]>
Signed-off-by: Jonathan McCrohan <[email protected]>
admin/muninlite/patches/110-fix-uptime-days.patch [new file with mode: 0644]

diff --git a/admin/muninlite/patches/110-fix-uptime-days.patch b/admin/muninlite/patches/110-fix-uptime-days.patch
new file mode 100644 (file)
index 0000000..17ef208
--- /dev/null
@@ -0,0 +1,9 @@
+--- a/plugins/uptime
++++ b/plugins/uptime
+@@ -7,5 +7,5 @@
+   echo "uptime.cdef uptime,86400,/"
+ }
+ fetch_uptime() {
+-  echo "uptime.value" $(cut -d\  -f1 /proc/uptime)
++  awk '{printf "uptime.value %.2f",$1/86400; print ""}' /proc/uptime
+ }